namespace CSharpPro._1030;

public class Demo
{
    private int id;
    private string name;

    public string Name
    {
        get => name;
        set => name = value ?? throw new ArgumentNullException(nameof(value));
    }

 
    public int Id
    {
        get => id;
        set => id = value;
    }
    
    

    public void TestPrint1()
    {
        Father father = new Father();
        father.Print();

       
        Child child = new Child();
        child.Print();

        Console.WriteLine("----------------");
        Father f1 = new Child();
        f1.Print();
        
        // int result = Add(10,20);
        //Add(1.0,2.0);
        //Convert.ToInt32()
    }

    public int Add(int a, int b)
    {
        return a + b;
    }

    public double Add(int a, int b, int c)
    {
        return a + b + c;
    }

    public double Add(double a, int b)
    {
        return a + b;
    }

    public double Add(int a, double b)
    {
        return a + b;
    }
    
    public static double Add(double a, double b)
    {
   
        return a + b;
    }
}